package design_patterns.prototype;
public class AAA implements Cloneable {
    private BBB bbb = new BBB();

    public void setName(String name) {
        this.bbb.setName(name);
    }

    public String getName() {
        return this.bbb.getName();
    }

    @Override
    protected AAA clone(){
        AAA aaa = null;
        try {
            aaa = (AAA) super.clone();
        }catch (CloneNotSupportedException e){
            e.printStackTrace();
        }
        return aaa;
    }

	@Override
	public String toString() {
		return "AAA [bbb=" + bbb + "]";
	}
    
    
}